#include "comm.hpp"
#include "udp_server.hpp"
#include <memory>

void Usage(std::string proc)
{
    std::cout<< "Usage : \n\t" << proc << "local_ip local_port\n" << std::endl;
}

int main(int argc, char* args[])
{
    if(argc != 3)
    {
        Usage(args[1]);
        exit(Usage_err);
    }
    std::string ip = args[1];
    uint16_t port = atoi(args[2]);
    std::unique_ptr<udpserver> user = std::make_unique<udpserver>(ip, port);
    user->Init();
    user->Start();
    return 0;
}